#define _CRT_SECURE_NO_WARNINGS  1

#include<stdio.h>
#define N 10

int bin_search(int arr[], int left, int right, int k)
{
	int mid = 0;
	int f = -1;
	while (left <= right)
	{
		mid = (left + right) / 2;
		if (arr[mid] == k)
		{
			f = mid;
			break;
		}
		if (k < arr[mid])right = mid -1;
		if (k > arr[mid])left = mid + 1;
	}
	if (f == -1)
		return f;
	else
		return f;
}

int main()
{
	int arr[N] = {1,2,3,4,5,6,7,8,9,10};
	int n = 0;
	scanf("%d", &n);
	int m = 0;
	m = bin_search(arr, N-N, N-1, n);
	printf("%d\n", m);
	return 0;
}